home *** CD-ROM | disk | FTP | other *** search
/ PC Format Collection 21 / PC Format CD-ROM Collection 21 (1995-12)(Future Publishing)(GB)[issue 51].iso / resource / optics.h < prev    next >
C/C++ Source or Header  |  1990-07-19  |  2KB  |  55 lines

  1. #ifndef OPTICS_H
  2. #define OPTICS_H
  3.  
  4.  
  5. typedef struct xyzPoint
  6. /* Three dimensional point */
  7.     {
  8.     double x,y,z;            /* pixel coordinates */
  9.     } XyzPoint;
  10.  
  11.  
  12. typedef struct optPos
  13. /* An element of an optics move.  One of these generated for each 
  14.    Continue-Move menu press or OptContinue() poco call. */
  15.     {
  16.     XyzPoint move;            /* offset for straight move */
  17.     XyzPoint spin_center;    /* center point of spin in pixels */
  18.     XyzPoint spin_axis;        /* a line from 0,0,0 to here defines spin axis*/
  19.     XyzPoint spin_angle;    /* spins about 3 axis.  In degrees */
  20.     XyzPoint size_center;    /* center point of scaling in pixels */
  21.     long xp, xq;             /* xscaling factor.  newx = oldx*xp/xq */
  22.     long yp, yq;            /* yscaling factor.  newy = oldy*yp/yq */
  23.     long bp, bq;            /* both scale.  Applied after x and y scale */
  24.     } OptPos;
  25.  
  26.  
  27. typedef struct optState
  28. /* Contains all the motion information for an optics transformation */
  29.     {
  30.     int pos_count;            /* Number of OptPos's */
  31.     OptPos *pos;            /* Info on all the optics sliders. */
  32.     int path_count;            /* Points in the optics path (0 if no path) */
  33.     int *xpath;                /* X coordinates of path */
  34.     int *ypath;                /* Y coordinates of path */
  35.     char path_type;            /* one of PATH_ defines below */
  36.     Boolean path_closed;    /* is movement path closed? */
  37.     Boolean outlined;        /* is element outlined? */
  38.     char element;            /* one of EL_ defines below */
  39.     } OptState;
  40.  
  41. /* values for OptState->path_type */
  42. #define PATH_SPLINE        0
  43. #define PATH_POLY        1
  44. #define PATH_SAMPLED    2
  45. #define PATH_CLOCKED    3
  46.  
  47. /* values for OptState->element */
  48. #define EL_SCREEN    0
  49. #define EL_THECEL    1
  50. #define EL_POLY     2
  51. #define EL_SPLINE    3
  52. #define EL_TWEEN    4
  53.  
  54. #endif /* OPTICS_H */
  55.